/*
import java.util.Scanner;

*/
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: HP
 * Date: 2022-04-27
 * Time: 16:07
 *//*

public class GreatestCommomDivisor {
    static int CommonDivisor(int a, int b) {
        a = a > b ? a : b;
        b = a < b ? a : b;
        int ret = a % b;
        if (ret == 0) {
            return b;
        } else {

            while (a % ret != 0 || b % ret != 0) {
                a = b;
                b = ret;
                ret = a % b;
            }
            return ret;
        }
    }
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int a = sc.nextInt();
            int b = sc.nextInt();
            System.out.println("的最大公约数是："+CommonDivisor(a,b));
        }
    }
}*/
